/**
 * author:Administrator
 * date:2016/1/13
 * desc:TODO
 */
'use strict';

var Model = require('../model/role.js');
var Sequelize = require('sequelize');
var sequelize = require('../conn/sequelize.js');

var appUtil = require('../common/app_util.js');
var errCode = require('../common/err_code.js');

var dao = {};
module.exports = dao;

/**
 * findOne
 */
dao.findOneByWhere = function* (where) {
  var seqObj = yield Model.findOne(where);
  return appUtil.fout(seqObj && seqObj.dataValues);
};